Method and apparatus for positioning a new window on a display screen based on an arrangement of previously-created windows

ABSTRACT

A method and apparatus for positioning windows on a display screen in a computer environment in which a user perceives that multiple operations can be executed simultaneously. The method and apparatus for positioning windows is based upon the number of existing windows and the arrangement of previously-created windows. Preferably, a computer system incorporating the invention includes a one or more dam structures, herein called &#34;window slots&#34;, each window slot retaining location information and indicating, either explicitly or implicitly, availability of the window slot. Window slots can be organized into a window slot structure. If a window is being opened, then a window slot is assigned to the window being opened and a window slot structure having zero or more window slots is updated. The assigning and updating is based upon the availability of a window slot and the number of in-use window slots in the window slot structure. Then the assigned window slot is associated with an identifier for the window being opened, and the window is opened on the display device.

LIMITED COPYRIGHT WAVIER

A portion of the disclosure of this patent document contains material towhich the claim of copyright protection is made. The copyright owner hasno objection to the facsimile reproduction by any person of the patentdocument or the patent disclosure, as it appears in the U.S. Patent andTrademark Office file or records, but reserves all other rightswhatsoever.

FIELD OF THE INVENTION

This invention relates generally to positioning windows on a displaydevice in a computer system and, more specifically, to the displaying ofa window on a display device at a location based upon an arrangement ofpreviously-created windows.

BACKGROUND OF THE INVENTION

A window is an object which contains or presents information and whichcan be displayed upon a screen of a display device. A window may bevisible or partially or totally obscured by one or more other windows. Awindow typically has two portions: a content region and a structureregion. The content region is where information from an applicationprogram or a user is contained or presented. The structure region is theborder region or frame of the window which may contain controls, i.e.buttons, scroll bars, or other mechanisms for issuing commands or formanipulating the window. Background information on windows can be foundin "Apple Human Interface Guidelines",

Windows can be opened or closed. In an environment which supportswindows, a window is usually opened when a file is opened or created andthe contents of the file are displayed in the content region of thatwindow. In addition, a window is usually opened to display a message toa user when an action or process is being performed by the computersystem. For example, a window can be used to display a status, error orother message indicating rite progress of the action or process. Thewindow can also be used to display a request for input from the user inorder to continue the action or process. When a window is closed, theassociated file, if any, is also closed.

Typically, computer systems support multiple windows being opensimultaneously. In multi-tasking or parallel-processing computersystems, typically windows are active as long as they are open, even ifthey are partially or totally obscured from view by other windows. Inother systems, although multiple windows can be open, only one windowcan be active at any point in time. Usually, the active window is placedin the forefront so that it is not obscured by other windows. The activewindow is typically further differentiated from other windows byindicating its active status in the structure region.

When a window is opened, its positioning on a display screen isdetermined. The positioning of the window can be important to a usersince multiple windows can be displayed at the same time and there is afinite amount of space on a display screen in which to display thewindows.

In some cases, a user may have a preference as to where a particularwindow or type of window is positioned. For example, a user may prefer aparticular position on the screen for status windows, while it mayprefer a different specific position for a particular applicationprogram. Although prior window management systems permit a user orapplication to specify location information for windows associated withobjects or processes, also called actions, operations or tasks, they donot permit a single process to simultaneously display multiple windows.In a system which permits multiple tasks to concurrently execute, ifthere are multiple tasks displaying windows simultaneously then thewindows are displayed at random locations on the screen. By random, itis meant that the location of each of those windows is not based on anyprior user preferences. This situation may occur, for example, whenmultiple operations such as searches for files on a system or copyoperations are concurrently being performed. Each search or copyoperation may have a separate window for displaying the status and/orresults of that search or copy.

An example of such a system is the FINDER which is part of theMacintosh® computer's system software, commercially available from AppleComputer, Cupertino, Calif. For information on the FINDER see "MacintoshUser's Guide for desktop Macintosh computers", particularly chapters 2,4, 5, 6, 10 and 12, Apple Computer, Inc. 1992, the disclosure of whichis herein incorporated by reference.

The FINDER is an application that manages a user's desktop interface. Itis the program that creates the Macintosh desktop and keeps track offiles. It displays icons representing an application and the documentscreated by an application and it tracks user activity on the desktop.When appropriate, the FINDER starts up an application and indicateswhich documents to open or print. The preferences folder is under thesystem folder and holds preferences files to record local configurationsettings.

In the FINDER, versions 7.0 and 7.1, window positioning information isassociated with objects such as folders. For descriptive purposes,"FINDER" refers to both versions 7.0 and 7.1. When an object is opened,the window in which the data for that object is displayed is positionedat the location on the screen associated with that object. Initially,this window positioning information is set to a default location on thescreen such as the upper left of the screen. If a window already existsin the location specified for that object then the object's window ispositioned slightly below and to the fight of the existing window. Whenan object's window is closed, the current position of the window isstored as the window positioning information associated with the object.Thus, if a window is moved between the time it is opened and closed, thenew location is stored with the associated object and when the object issubsequently opened again, the window appears in the new location. Thus,a user's preference for window positioning as indicated by the locationto which the window was moved, is stored and used later if the object isopened again.

In the FINDER, window positioning information is also associated with aprocess or operation. For example, when a user selects a DUPLICATEoperation from the FILE menu, a status window is displayed detailing theprogress of the DUPLICATE operation. The location of this window isderived from window positioning information associated with theDUPLICATE operation. This information is stored in the FINDERpreferences file. This file contains window positioning information onan individual process basis for virtually all processes or operationsprovided to a user by the menu bar of the FINDER. Since the FINDERexecutes one process at a time and permits a single window per process,the FINDER can store in the preferences file only one location for eachtype of process.

If the window is moved while the process is running, then the newlocation is stored in the window positioning information associated withthat process and the next time the process is invoked, the window willappear in the new location.

The FINDER is not designed for an environment in which a user perceivesthat multiple operations are executing simultaneously. The presentinvention is directed toward such an environment, providing severaladvantages.

SUMMARY OF THE INVENTION

Briefly, the invention is a method and apparatus for positioning windowson a display screen in a computer environment in which a user perceivesthat multiple operations can be executed simultaneously. According tothe invention, the location on a display device of a window being openeddepends upon the number of existing windows and the arrangement ofpreviously-created windows. The invention is particularly useful in anenvironment where windows are not associated with specific objects suchas folders, files or disks, although it can be used in suchenvironments.

In general, a desktop management or file system incorporating theinvention includes means for retaining location information and meansfor indicating availability of the retaining means. In a preferredembodiment, the means for retaining location information and the meansfor indicating availability are embodied in one or more data structures,each herein referred to as a "window slot", which at the least specifiesdirectly or indirectly a location on a display device, e.g. screen, andexplicitly or implicitly indicates whether the data structure is in-useor available. Window slots are logically grouped and referenced usingone or more window slot structures. In systems where window slotsexplicitly indicate availability, one window slot structure ispreferably used. However, in other systems two or more windowslot'structures can be used to implicitly indicate availability. Forexample, the system can include one window slot structure for windowslots which are in-use and another window slot structure for windowslots which are available, i.e. not in-use.

The system further includes means for assigning a window to a windowslot and means for accessing a window slot to retrieve the locationinformation specified by the window slot. A window slot is consideredavailable, or in other words not in-use, when it is not currentlyassigned to any particular window.

In a preferred embodiment where a single window slot structure is used,when a window is opened, it is assigned an available window slot, if anyexists, and the window is displayed at the location specified in thewindow slot. If there are no available window slots, a new window slotis created and assigned to the window. The window is displayed at alocation which is determined based on the arrangement ofpreviously-created windows.

When a window is closed, its current location is stored in the windowslot assigned to that window such that when the window slot issubsequently assigned to another window, it will be displayed in thesame location. If the window slot includes means for indicating itsavailability, then it is updated to specify that the window slot isavailable. By storing the window's location when it is closed theinvention retains information about a user's or application's preferencefor window locations. For example, a user may move a window to aparticular location to more easily view another window. Additionally, auser may prefer to have windows appear in a particular area of thescreen in order to work more efficiently. The invention retains thisinformation about user preferences for window locations and permitssubsequently created or opened windows to be displayed according tothese preferences.

In an alternative embodiment where available and unavailable windowslots are grouped separately, when a window is opened, an availablewindow slot, if any exists, is assigned to fie window as previouslydescribed. The window slot is removed from the available group and addedto the group of unavailable window slots. If there are no availablewindow slots, then a new window slot is created, assigned to the windowand added to the group of unavailable window slots. When a window isclosed, its corresponding window slot is removed from the group ofunavailable window slots and added to the group of available windowslots.

Since the location at which to display a window being opened isdetermined by the location of a previously existing window or by thearrangement of existing windows, the invention retains information aboutuser preferences for locations of windows. Thus, the invention displayswindows in locations which are likely to be desirable by a user.

In addition, the invention provides for an arbitrary number ofsimultaneous process windows in a manner that is simple and effectivefor the user. It provides a method for memorizing window positions forwindows that are not associated with more permanent or persistentobjects such as disks, folders, files.

The invention is particularly useful in an environment where a userperceives that multiple operations are being performed concurrently,regardless of the actual implementation of the underlying environment.Thus, the invention is useful in multi-tasking, multi-processing andparallel processing environments, as well as in a single-tasking systemwhich operates in a manner that seems like multi-tasking to a user.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and further advantages of the invention may be betterunderstood by referring to the following description in conjunction withthe accompanying drawings, in which:

FIG. 1 is a symbolic, simplified block diagram of a system which mayincorporate the invention;

FIG. 2 is a block diagram of a display device of the system of FIG. 1;

FIG. 3 shows generally contents of a memory of FIG. 1;

FIGS. 4A and 4B show alternative window slot structures;

FIGS. 5A and 5B show alternative window identification structuresmaintained in the memory of the system of FIG. 1;

FIGS. 6A and 6B illustrate different implementations of a windowidentification structure as shown in FIGS. 5A or 5B;

FIG. 7 is a flowchart which generally depicts the steps performed whenopening or closing a window in a system of FIG. 1 incorporating theinvention;

FIG. 8 is a flowchart which more specifically describes the stepsperformed in opening or closing a window on a system FIG. 1 embodyingthe invention.

FIG. 9 is a more detailed flowchart of the steps performed at block 102of FIG. 8;

FIG. 10 is a more detailed flowchart of the steps performed at block 152of FIG. 9;

FIG. 11 is a more detailed flowchart of the steps performed at block 154of FIG. 9;

FIG. 12 is a more detailed flowchart of the steps performed at block 158of FIG. 9;

FIG. 13 is a more detailed flowchart of the steps performed at block 222of FIG. 12; and

FIG. 14 is a more detailed flowchart of the steps performed at block 108of FIG. 8.

DETAILED DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a computer device 10 which can incorporatethe invention. It comprises a processor 12 such as a central processingunit ("CPU") or other microprocessor. A bus 14 interconnects theprocessor 12 with a memory 16, a disk memory 18, an input device 20 anda display device 22.

The computer device 10 can be any of a personal computer, workstation,minicomputer or large computer, or other specialized computing devicecapable of executing an operating system or other software withwindowing capabilities. The computer device 10 may be connected to othercomputer devices (not shown) via a network (not shown) such as alocal-area network, high-speed bus or other interconnecting mechanismfor exchanging messages and data, such as AppleTalk, Ethernet or TokenRing.

The memory 16 is random access memory (RAM). The disk memory 18 is morepermanent memory such as a hard disk.

The input device 20 can be a keyboard, mouse, external disk drive orother device capable of receiving input.

The display device 22 can be a monitor or other display device having ascreen 24 on which text, graphics or other images can be displayed andviewed.

Numerous types of computer systems may be used, but in the presentembodiment, computer software is usually stored on the disk memory 18and brought into memory 16 over the bus 14 in response to commandsissued over bus by the CPU 12. Preferably, the CPU 12 runs an operatingsystem 21 which, possibly together with specialized hardware, supportswindowing, i.e. the display and functioning of multiple windows on adisplay device 22. The operating system 21 is typically stored on diskmemory 18 and loaded into memory 16 for execution. Typically, operatingsystems provide application interfaces for manipulating a window, e.g.opening, closing, moving, and for obtaining information about a window,e.g. location, size. An example of an operating system which may be usedis the Apple Macintosh System 7 operating system. For information onMacintosh operating systems, refer to "Inside Macintosh", Vols. I-VI,Addison-Wesley Publishing Co. (1985-1991). "Macintosh" is a registeredtrademark and "System 7" is a trademark of Apple Computer, Inc.

A desktop management and file management system 43 incorporates theinvention. The management system 43 can be part of the operating systemor it can be a separate application program which runs on top of theoperating system. The management system is typically stored on disk 18and loaded into memory 16 when a computer is turned on.

FIG. 2 illustrates generally a display device 22 having a screen 24 onwhich to display text, graphical or other images. The screen 24 includesa display area 26. For purposes of the invention, the display area 26 isthe area on the screen on which windows 28 are displayed according tothe invention. The display area 26 may cover the entire area of thescreen 24 or just a portion thereof. For descriptive purposes the termsdisplay device, screen and display area are hereinafter usedinterchangeably to mean a portion of the display device upon whichwindows can be displayed.

In a management system 43 incorporating the invention, a first datastructure, herein called a "window slot", specifies directly orindirectly a location on the display device. The window slot alsoexplicitly or implicitly specifies whether the window slot is availableor in-use. Typically when a window is opened it is assigned an availablewindow slot, if one exists. When a window slot is assigned to a windowit is considered to be in-use. If an available window slot does notexist, then a new window slot is created and assigned to the window.When a window is closed, the corresponding window slot is "deassigned"and made available.

The location information specified by a window slot depends on whetherthe window slot is in-use or available. If the window slot is in-use,then the window slot typically specifies a location at which thecorresponding window was originally displayed. Optionally, the locationinformation specified by the window slot can be updated as thecorresponding window is moved to another location on the display device.When a window slot is available, i.e. not in-use, the window slotspecifies a location on the display device at which a previouslycorresponding window was located when that previously correspondingwindow was closed. Typically, this is a location occupied by the windowwhich was last assigned to the window slot.

Preferably, the system further includes a most-recently-used variable 47("mru"), a second-most-recently-used variable 48 ("smru") and at leastone window slot structure 50, as shown pictorially in FIG. 3. A windowslot structure 50 references one or more window slots 52 either directlyor indirectly. Typically, a window slot structure 50 is located inmemory 16 or on the disk memory 18 of a computer device 10 (FIG. 1). Awindow slot structure 50 can be a list or a table, implemented using anyappropriate data structure capable of being searched or traversed. Forexample, a window slot structure 50 can be implemented as an array, alinked list or a double linked list.

The most-recently-used variable 47 specifies the window slot which wasmost recently assigned to a window. The second-most-recently-usedvariable 48 indicates which window slot was assigned to a windowimmediately prior to the assignment of the window slot identified by themost-recently-used variable 47.

Depending on the configuration of the management system 43, the windowslot may specify availability explicitly (FIG. 4A) or implicitly (FIG.4B). In a first embodiment, as shown pictorially in FIG. 4A, themanagement system includes a window slot structure which references bothavailable and in-use window slots. In this case, a window slot itselfdirectly or indirectly indicates whether the window slot is available.

The window slot 52 contains at least two fields: a first slot field 60,called a "location data" field, for directly or indirectly specifying alocation on the display device and an associated second slot field 62,called an "in-use" field, for specifying whether the window slot iscurrently "in-use" or available. A window slot is considered to bein-use when that window slot is currently assigned to an open window.The in-use field 62 can be, or can reference, any data structure capableof indicating at least two states: an in-use state and an availablestate. For example, the in-use field can be a one-bit flag field inwhich the window is in-use when the in-use field has a value of TRUE.

The location data field 60 specifies a location on the display screenfor positioning a particular portion of a window, e.g. the top-leftcorner of a window. The location data field 60 is comprised preferablyof two integers, a first integer representing a horizontal coordinateand a second integer representing a vertical coordinate. The first andsecond integers can be mapped to an individual pixel or location on thescreen.

In an alternative embodiment, as shown pictorially in FIG. 4B, themanagement system 43 is configured so that the availability of a windowslot is determined from the window slots surroundings, rather thandirectly from the window slot. In this case, the system typicallyincludes two or more window slot structures as described in conjunctionwith FIG. 3. The example shown in FIG. 4B includes two window slotstructures, an in-use window slot structure 50a and an available windowslot structure 50b. The in-use window slot structure 50a directly orindirectly references window slots which are currently in-use, while theavailable window slot structure 50b directly or indirectly referenceswindow slots which are currently available. Thus, the availability of awindow slot can be determined according to the slot structure by whichit is referenced.

FIGS. 5A and 5B pictorially illustrate various implementations of awindow slot structure. FIG. 5A shows a window slot structure 50cimplemented as a table of window slots, while FIG. 5B illustrates awindow slot structure 50d implemented as a linked list. The window slotstructure 50c, shown in FIG. 5A, includes one or more window slots 52,as previously described in conjunction with FIG. 4A.

In FIG. 5B, the window slot structure 50d contains one or more structureitems 54. Each structure item 54 includes a first structure field 56 anda second structure field 58. The first structure field 56 references awindow slot 52 and the second structure field 58 references the nextstructure item 54 in the window slot structure 50d. The end of thewindow slot structure can be denoted and recognized using anyconventional method. For example, a structure item 54 having a firststructure field specifying a value that indicates the end of the listcan be positioned at the end of the list. A traversal through the listwhich is not terminated through other means can then terminate uponreaching that end of the list value. Alternatively, a structure item 54having a first structure field which specifies the number of structureitems in the list can be placed at the head of the list.

Preferably, the one or more window slot structures 50 are initializedthe very first time a user logs on or a computer system is powered up,depending on the type of computer system, e.g. a single workstation, anetwork of workstations, a mainframe, or a mini-computer. Moreover, whena computer user logs off or a computer system is powered off, theinformation in the one or more window slot structures and the referencedwindow slots is preserved for future use, e.g. stored on the disk 18(FIG. 1). In a system having multiple users, the information for eachuser is preserved when the computer system shuts down or is powered off.Then when the user logs on the next time or the computer is restarted,the stored information is reloaded and reused.

The manner in which an empty window slot structure 50 is denoted dependsupon the format of the window slot structure 50. If the window slotstructure 50 is an array or a linked list having a header whichspecifies the number of entries in the structure, then the list isinitialized by setting the header to specify that there are zero entriesin the structure. However, if the window slot structure 50 is an arrayor linked list with an "ender", i.e. a node or element having a valuewhich indicates that it is the last node or element in the structure,then the window slot structure is initialized so that the only entry inthe structure is the ender. The manner in which the window slotstructure is initialized should be consistent with the manner in whichthe end of the window slot structure is denoted.

Alternatively, the window slot structure is initialized having onewindow slot 52. In that initial window slot 52, the location data field60 is set to a default location such as the upper left of the screen orthe center of the screen and the in-use field 62 is set to valueindicating that the window slot 52 is not in-use, i.e. not assigned to awindow.

The following code segment written in a C++ language, as set forth in"Annotated C++ Reference Manual", Ellis & Stroustrup, Addison-Wesley,1990, generally illustrates an example of a data structure definitionfor a window slot structure 50. This code segment could be used on anyprocessor that has a C++compiler that conforms to the standards setforth in the Annotated C++ Reference Manual, previously cited. In thisexample, the window slot structure 50, called "TWindowList", isimplemented using a linked list as shown in FIG. 5B.

    ______________________________________                                        class TWindowSlot                                                             Point       fLocation;                                                                             //Horizontal and vertical coordinates                    Boolean     FInUse;  //TRUE if slot is in-use                                 }                                                                             class TWindowList                                                             {                                                                             T WindowSlot*                                                                             fItem;   //Pointer to a window slot                               T WindowList*                                                                             fNext;   //Pointer to next item in list                           }                                                                             ______________________________________                                    

Typically, the most-recently-used variable 47 and thesecond-most-recently-used variable 48 are initialized at or near thetime when the window slot structure is initialized. Preferably, thevalues of these variables are also preserved on disk 18 (FIG. 1) when auser logs off or a computer system is shutdown or powered off.Typically, the variables 47 and 48 each specify a pointer to a windowslot 52. However, if the window slot structure 50 is implemented as atable or array then the variables 47 and 48 can each be an integerspecifying an index into the table or array. If the variables 47 and 48are pointers, then typically each is initialized to a nil pointer. Ifthe variables 47 and 48 are integers, then typically each is initializedto a value which is not a valid index into the array or table and whichis recognized as an initialized value, e.g. 0 or ˜1.

As shown in FIGS. 6A and 6B, typically each process or application whichopens or closes one or more windows maintains a data structure or othermeans for keeping track of the window slot assigned to each windowbelonging to that process or application. This data structure or othermeans is herein referred to as a window identification structure 70.

Typically, the window identification structure 70 includes multipleentries 72, each entry having at least a first field 74 and a secondfield 76. The first field 74, called a "window identification field",specifies a value or identifier, also called a "handle", which uniquelyidentifies a window. In an entry 72, the second field 76, called a"window slot field", specifies a window slot associated with the windowhandle identified by the window identification field in that entry.

The window identification structure can be represented by an array/table(FIG. 6A) or a linked list (FIG. 6B). The actual implementation of thewindow identification structure is not relevant to the invention. Anydata structure can be used as long as information of the type specifiedby the window identification field and the window slot field, describedabove, can be stored and accessed. The window identification structureis typically located in memory 16 (FIG. 1).

The handle is typically retrieved from an underlying operating system orwindow management routine which actually creates the window. Preferably,a window handle uniquely identifies a window system-wide acrossprocesses, i.e. no other window in the system shown in FIG. 1 has thesame handle. Alternatively, a window handle can uniquely identify awindow within a process, but not across processes. For example, when awindow identification structure 70 is an array, a window handle may bean index into the array. However, this implementation typically includesa data structure for maintaining a relationship between the operatingsystem's identification of the window and the window handle. Thisrelationship is maintained so that the process and the operating systemcan communicate regarding manipulations of a particular window.

Alternatively, rather than each process retaining a windowidentification structure, each window retains information about itsassigned window slot. For example, the data structure which describes awindow and its associated characteristics contains a window slot fieldfor specifying a window slot.

FIG. 7 describes generally the steps performed in opening or closing awindow on a computer system of FIG. 1 embodying the invention. The stepsin FIG. 7 are typically performed in response to a request from a user,an application program, a system program, an input or output device, orother mechanism for requesting that an operation be performed upon awindow. In a system running Macintosh System 7 with a FINDER, a user canopen a window by double-clicking a curser on an icon or by selecting an"open" option off a menu bar. A user can dose a window by clicking acursor on a specialized "button" in the structure region of the windowbeing closed. This "button" is typically located in the top-left cornerof the window. Alternatively, the user can select a "close" or "quit"option off a menu bar.

At decision block 80, it is determined which operation has beenrequested. If an open window operation was requested, then at decisionblock 82, it is determined whether an available window slot exists. Ifan available window slot exists, then at block 84 the window isassociated with an available window slot and it is delineated in somemanner that the window slot is no longer available. At block 86 thewindow is opened and displayed on the display device at a locationspecified by the associated window slot.

If at decision block 82 an available window slot does not exist, then atblock 88 a new window slot is created and at block 90 it is determinedat which location on the display device to display the window. Then atblock 92 the window is displayed at that determined location.

If at derision block 80 a dose window operation was requested, then atblock 94 the corresponding window slot is set to specify the location onthe display device of the window being closed. Block 94 can be skippedin implementations where the window slot already specifies the locationof the corresponding window being closed. For example, in someimplementations a window slot is updated whenever the correspondingwindow is moved to a new location on the display device. In that case,the window slot will already specify the location of the window beingclosed.

At block 96 the corresponding window slot is made available and at block98 the window is closed. Blocks 96 and 98 can be performed in any order.

If at derision block 80 an operation other than opening or closing awindow was requested, then at block 99 the requested operation isperformed.

FIG. 8 describes more specifically the steps performed in opening ordosing a window on a system of FIG. 1 embodying the invention. As withFIG. 7, the steps in FIG. 8 are typically performed in response to arequest to manipulate a window in some manner. As shown in FIG. 8, if atdecision block 100, a window is being opened, then based upon theexistence of an available window slot and upon the number of in-usewindow slots in the window slot structure, at block 102 assign a windowslot to the window being opened and update the window slot structure 50accordingly. Then at block 103, update the window identificationstructure 70 for the process using the window being opened. Block 103can be skipped in embodiments of the invention which do not include awindow identification structure 70.

The method of updating the window identification structure 70 dependsupon the implementation of that identification structure. For example,if it is a linked list, then an element 72 is added to the linked list.The window identification field 74 of that element is set to the windowhandle of the window being opened and the window slot field 76 is set toreference the window slot assigned at block 102. The actual method usedto update the window identification structure 70 is not relevant to theinvention as long as the window handle of the window being opened andits assigned window slot are stored and accessible in a manner wherebygiven a window handle, its assigned window slot can be retrieved andvice versa.

Then at block 104, open the window and display it according to thelocation information in the assigned window slot 52.

If at decision block 100, a window is not being opened, then if atdecision block 106 a window is being closed, then control passes toblock 108. At block 108, release the window slot which was assigned tothe window being closed. If the embodiment of the invention includes awindow identification structure, then the window identificationstructure 70 for the process which was using the window being closed isused to determine which window slot to release. The window handle of thewindow being closed is used to lookup the window slot assigned to thatwindow. For example, the window identification structure 70 can besearched for an entry 72 having a window identification field 74specifying the window handle of the window being closed. If such anentry 72 is found, then the window slot identified by the window slotfield 76 of that entry is released; otherwise, an error condition hasoccurred and can be handled accordingly. Then at block 109 if theembodiment of the invention includes a window identification structure70, update that structure to disassociate the window being closed fromthe released window slot. Then at block 110, close the window.

If at derision block 106 a window is not being closed, then perform theoperation without reference to the invention. In this case, theoperation being performed is unrelated to the invention.

FIG. 9 depicts in further detail the steps performed at block 102 ofFIG. 8. At decision block 152 determine whether at least one of thewindow slots referenced by the window slot structure is available, e.gnot in-use. If there is at least one available window slot, then atblock 154, assign an available window slot to the window being opened.In an embodiment of the invention as shown in FIG. 4, the availablewindow slot structure 50b is the structure which is searched for anavailable window slot.

If at block 152 the window slot structure does not reference at leastone free window slot, then control passes to block 154. At block 154,create a new window slot and add it to the window slot structure. Thenat block 158, assign the new window slot to the window being opened.

Irregardless of the outcomes of decision block 152, at block 160 updatethe most-recently-used variable 47 and the second-most-recently-usedvariable 48. The second-most-recently-used variable 48 is set to thevalue of the most-recently-used variable 47. The most-recently-usedvariable 47 is set to reference the window slot assigned to the windowbeing opened.

FIG. 10 illustrates a more detailed embodiment of the steps performed atblock 152 of FIG. 9. At block 170 search the window slot list until anavailable window slot is found or until all of the window slots havebeen examined, whichever occurs first. The actual mode of searching thewindow slot list is not important to the invention. Moreover, in apreferred embodiment, the first available window slot is sought. Inalternative embodiments, available window slots other than the first onefound may be used. In an embodiment of the invention as shown in FIG. 4Bthe available window slot structure 50b is the structure which issearched for an available window slot at block 170.

At derision block 172 if an available window slot was found, then atblock 174 indicate that an available window slot was found; otherwise atblock 176, indicate that an available window slot was not found. Thisindication can be direct or indirect and by any means to determinewhether to proceed to block 156 or block 154 from block 152 in FIG. 9.

FIG. 11 illustrates in more detail the steps performed at block 154 ofFIG. 9. At block 200 delineate the available window slot as beingin-use. In an embodiment of FIG. 4A, this can be accomplished by settingthe in-use field to specify that the window slot is in-use. In anembodiment of FIG. 4B, this can be accomplished by having the windowslot be referenced by the in-use window slot structure 50a, rather thanby the available window slot structure 50b. At block 202, position thewindow being opened in the display area at the location specified by theavailable window slot which was delineated at block 200.

FIG. 12 depicts in more detail the steps performed at block 158 of FIG.9. At block 220, delineate the new window slot as being in-use, aspreviously described in conjunction with FIG. 11. At block 222,determine the position data for the new window and stored in the newwindow slot. This position data specifies the location on the displayarea at which to position the new window.

FIG. 13 shows in more detail the steps performed at block 222 of FIG.12. At decision block 250, determine whether the window slot structurereferences any other window slots besides the new window slot created atblock 154 of FIG. 9. If there are other window slots, then controlpasses to decision block 252; otherwise, control passes to block 254.

At decision block 252, determine whether the window slot structure 50references only one other window slot besides the window slot created atblock 154 of FIG. 9 or if it references more than one. If it referencesonly one other window slot, then control passes to block 256; otherwise,control passes to block 258. In an embodiment of the invention as shownin FIG. 4B the available window slot structure 50b is the structurewhich is used in blocks 250 and 252.

At block 256, calculate a position which is at an offset from thelocation specified by that other window slot, e.g. slightly below and tothe right. At decision block 260, determine whether the positioncalculated at block 256 is a valid location within the display area ofthe screen. If it is, then at block 262 set the location data field ofthe new window slot to specify the position calculated at block 256. Ifit is not a valid location, then at block 264 set the location datafield of the new window slot to specify a position at a defaultlocation, e.g. the top-left corner of the display area.

If at derision block 280 the window slot structure does not referenceany other window slot besides the window slot created at block 154 ofFIG. 9, then at block 254 set the location data field in the new windowslot to a default location. For example, the default location can be thecenter of the display area or the top-left corner of the display area.

If at decision block 252, the window slot structure references more thanone window slot other than the window slot created at block 154 of FIG.9, then at block 258 calculate the difference between the locationspecified by the most-recently-used window slot, i.e. the window slotreferenced by the most-recently-used variable 47, and the locationspecified by the second-most-recently-used window slot, i.e. the windowslot referenced by the second-most-recently-used variable 48. Then, addthe resulting difference to the location specified by themost-recently-used window slot. The location information is obtainedfrom the location data field of each of the above-referenced windowslots.

At derision block 266 determine if the final result obtained at block264 specifies a valid location within the display area of the screen. Ifit does, then at block 268 set the location data field in the new windowslot to the final result obtained at block 264. If at decision block 266the final result of block 264 does not specify a valid location, thencontrol passes to block 256 and the steps of blocks 256, 260, 262 and264 are performed as previously described.

FIG. 14 is a more detailed depiction of the steps performed at block 108of FIG. 8. At block 300, update the window slot associated with thewindow being closed to indicate the position of the window being closed,e.g. set the location data field. Typically, the window handle of thewindow being closed is used to retrieve the location of the window fromthe operating system or some other underlying window manager. At block302, delineate the window slot associated with the window being closedas being not in-use, as described previously in conjunction with FIG. 9.The method used to delineate the window slot as not in-use should be thereverse of the method used to delineate that the window is in use, asdescribed with FIG. 12. For example, if when a window is opened, awindow slot is moved from an available window slot structure 50b (FIG.4B) to an in-use window slot structure 50a, then when that window isclosed, its corresponding window slot is moved back to the availablewindow slot structure. Likewise, if when a window is opened, an in-usefield 62 (FIG. 4A) is set to specify that a window slot is in-use, thenwhen that window is closed, the in-use field of the corresponding windowslot is set to specify that the window slot is available.

In operation, preferably, the window slot structure, themost-recently-used variable and the second-most-recently-used variableare initialized when a computer is turned on or a user logs on for thefirst time ever. When a computer system is shutdown or a user logs off,the window slot structures for that user or on that computer system aresaved on disk and then reloaded and reused when the user or the computersystem is turned back on or logged back on, respectively.

When a request for an open window operation is initiated, the windowbeing opened is assigned an available window slot, if one exists, or anewly-created window slot, if no available window slot exists. If thewindow is assigned to an existing available window slot, then the windowis displayed at the location specified by that window slot. Otherwise, alocation at which to display the window is determined according to thenumber of in-use window slots and the locations of previously-createdwindows. The determined location is stored in the newly-created windowslot and the window is displayed at that location.

At some point, the window slot structure and window identificationstructure, or other means for keeping track of windows, are updated toreflect the assignment of the window and the window slot. Thesecond-most-recently-used variable is set to the value of themost-recently-used variable and the most-recently-used variable is setto reference either the window slot assigned to the window being openedor the location at which the window was displayed.

When a window is being closed, the window slot assigned to the windowbeing closed is released, e.g. the window slot in the window slotstructure is delineated as not being in-use. The window identificationstructure or other means for keeping track of windows is updated toreflect that the window being closed is no longer associated with thewindow slot which was released. The window is then closed.

The invention allows a process to display multiple windows concurrently,even if such windows are not associated with a more persistent objectsuch as a disk, folder, or document. Moreover, the invention providesfor user or application manipulation of the location of these windowssuch that the manipulations can affect the location of subsequentlydisplayed windows. Thus, users or applications can indirectly/directlyspecify preferences for where windows are to be displayed. Moreover, theinvention provides a mechanism for approximating a location on thescreen which is likely to be desirable and agreeable to a user.

The foregoing description has been limited to a specific embodiment ofthis invention. It will be apparent, however, that variations andmodifications may be made to the invention with the attainment of someor all of its advantages. Therefore, it is the object of the appendedclaims to cover all such variations and modifications as come within thetrue spirit and scope of the invention.

We claim:
 1. A method for positioning windows on a display screen in acomputer system in which a user perceives that multiple operations canbe executed simultaneously, the computer system having a processor, aninput device and a display screen, the processor capable of executing anoperating system which supports windowing functionality and a graphicaluser interface which supports windows, the input device capable ofreceiving information on the positioning of the windows, said methodcomprising the steps of:determining an operation to be performed on awindow; when the operation includes opening the window, determiningwhether a window slot structure references any available window slotsand if it does, then assigning an available window slot to the windowbeing opened, and if it does not, then creating a new window slot,determining a location based on availability of a window slot and thenumber of unavailable window slots, and setting the new window slot tospecify the determined location and assigning the new window slot to thewindow being opened such that the window slot is in-use; and when theoperation includes closing the window, storing in the window slotassigned to the window being closed the location on the display screenof the window being closed such that it can be accessed using theassigned window slot and unassigning the window being closed from thewindow slot such that the window slot is available.
 2. A method as inclaim 1 wherein the step of determining whether the window slotstructure references any available window slot includes the step ofsearching the window slots in the window slot structure until anavailable window slot is found or until all of the window slots havebeen examined, whichever occurs first.
 3. A method for positioningwindows on a display screen in a computer system in which a userperceives that multiple operations can be executed simultaneously, thecomputer system having a processor, an input device and a displayscreen, the processor capable of executing an operating system whichsupports windowing functionality and a graphical user interface whichsupports windows, the input device capable of receiving information onthe positioning of the windows, said method comprising the stepsof:determining an operation to be performed on a window; when theoperation includes opening the window, determining whether a window slotstructure references any available window slots and if it does, thenassigning an available window slot to the window being opened, and if itdoes not, then(a) creating a new window slot, (b) determining a locationby performing the following steps:(1) determining how many, if any,window slots, other than the newly created window slot, are referencedby the window slot structure; (2) if the window slot structure does notreference another window slot, then setting the new window slot tospecify a default location; (3) if the window slot structure referencesonly one other window slot then calculating a position which is at anoffset from the location specified by the one other window slot and ifthe calculated position is a valid location on the display screen, thensetting the new window slot to specify the calculated position, and ifthe calculated position is an invalid location on the display screenthen setting the new window slot to specify a default position; and (4)if the window slot structure references more than one other window slot,then determining a difference between a location specified by a windowslot referenced by a most-recently-used variable and a locationspecified by a window slot referenced by a second-most-recently-usedvariable, adding the determined difference to the location specified bythe window slot referenced by the most-recently-used variable to computea result, and if the result is a valid location on the display devicethen setting the new window slot to specify the result, and if theresult is not a valid location on the display device then performingstep (3) as if the window slot structure referenced only one otherwindow slot marked as in-use, (c) setting the new window slot to specifythe determined location, and (d) assigning the new window slot to thewindow being opened such that the window slot is in-use; and when theoperation includes closing the window, storing in the window slotassigned to the window being closed the location on the display screenof the window being closed such that it can be accessed using theassigned window slot and unassigning the window being closed from thewindow slot such that the window slot is available.
 4. A method as inclaim 3 further comprising the step of:when the operation includesclosing a window, updating the second-most-recently-used variable andthe most-recently-used variable.
 5. A method as in claim 3 wherein theupdating step comprises setting the second-most-recently-used variableto specify the location specified by the most-recently-used variable andthen setting the most-recently-used variable to specify the locationspecified by the window being closed.
 6. An apparatus for positioningwindows on a display screen in a computer system in which a userperceives that multiple operations can be executed simultaneously, saidapparatus comprising:a processor capable of executing an operatingsystem and a graphical user interface, each capable of supportingwindows; a display device for displaying windows; an input device formanipulating windows on the display device; a memory; a system businterconnecting said processor, said input device, said memory and saiddisplay device for exchanging information among them; means fordetermining what operation is being performed; and a window slotstructure stored in said memory, said window slot structure having zeroor more window slots, each window slot specifying a location on thedisplay device and specifying whether the slot is in-use, the locationspecified by a window slot being based on a location of a previouslycreated window, availability of a window slot and a total number ofin-use window slots.
 7. An apparatus as defined in claim 6 furthercomprising:means for assigning a window slot to a window being opened;means for updating the window slot structure based upon the availabilityof a window slot and the number of in-use window slots in the windowslot structure; and means for opening a window on the display device. 8.A computer system configured to provide windowing functionality, thefunctionality including operations of opening a window and closing awindow, said computer system comprising:a processor; a memory; a displaydevice having a display screen; a bus interconnecting said processor,memory and display device; said memory having stored therein one or morewindow slots, each window slot being configured to specify a location onsaid display screen and to specify availability of the window slot, awindow slot being unavailable when it is assigned to a particularwindow; and said processor configured to determine a location at whichto display a window on said display screen by(a) determining how many,if any, window slots, other than the newly created window slot, arereferenced by the window slot structure; (b) if the window slotstructure does not reference another window slot, then setting the newwindow slot to specify a default location; (c) if the window slotstructure references only one other window slot then calculating aposition which is at an offset from the location specified by the oneother window slot and if the calculated position is a valid location onthe display screen, then setting the new window slot to specify thecalculated position, and if the calculated position is an invalidlocation on the display screen then setting the new window slot tospecify a default position; and (d) if the window slot structurereferences more than one other window slot, then determining adifference between a location specified by a window slot referenced by amost-recently-used variable and a location specified by a window slotreferenced by a second-most-recently-used variable, adding thedetermined difference to the location specified by the window slotreferenced by the most-recently-used variable to compute a result, andif the result is a valid location on the display device then setting thenew window slot to specify the result, and if the result is not a validlocation on the display device then performing step (c) as if the windowslot structure referenced only one other window slot marked as in-use.9. A method for displaying windows in a computer system configured toprovide windowing functionality including operations of creating awindow, opening a window and closing a window, the computer systemhaving a processor, a memory, a display device having a display screen,and a bus interconnecting the processor, memory and display device, saidmemory configured to store therein one or more window slots, each windowslot configured to store a location and to implicitly or explicitlyindicate availability of the window slot, said method comprising thesteps of:when a window is created or opened,(1) determining whether anavailable window slot exists in said memory, (2) if an available windowslot exists, then assigning the window to the available window slot,displaying the window on the display screen at a location specified bythe available window slot and indicating that the available window slotis in-use, and (3) if an available window slot does not exist, thencreating a new window slot, assigning the window to the new window slot,determining a location, the location based upon the number of in-usewindow slots, setting the new window slot to specify the determinedlocation, displaying the window on the display screen at the determinedlocation and indicating that the available window slot is in-use.
 10. Amethod as defined in claim 9, further comprising the steps of:when awindow is closed,(1) setting the window slot associated with the closingwindow to a location at which the closing window was last displayed onthe display screen, (2) unassigning the closing window from theassociated window slot, and (3) indicating that the associated windowslot is available.
 11. A computer system configured to provide windowingfunctionality, the functionality including operations of opening awindow and closing a window, said computer system comprising:aprocessor; a memory; a display device having a display screen; a businterconnecting said processor, memory and display device; said memoryhaving stored therein one or more window slots, each window slot beingconfigured to specify a location on said display screen and to specifyavailability of the window slot, a window slot being unavailable when itis assigned to a particular window; and said processor configured todisplay a window on said display screen at a location based uponlocations of one or more previously-created windows, availability ofwindow slots and a total number of in-use window slots.
 12. A computersystem as in claim 11 wherein said window slots are stored within awindow slot structure, said window slot structure being stored in saidmemory.
 13. A computer system as in claim 11 wherein available windowslots are stored within a first window slot structure stored on saidmemory and unavailable window slots are stored within a second windowslot structure stored on said memory.
 14. A computer system having aprocessor, a display device and a memory, said computer system beingconfigured to open, close and display windows, said computer systemcomprising:said memory having stored therein one or more window slots,each window slot capable of being associated with an open window andconfigured to reference a location on the display device; means forindicating whether a particular window slot is in-use or available;means for determining if an available window slot exists; means forassigning an available window slot to a window being displayed; meansfor creating a new window slot; means for determining a location atwhich to display the window being displayed, said location being basedupon availability of a window slot and a total number of in-use windowslots; and means for assigning the determined location to the windowbeing displayed.
 15. A computer system as defined in claim 14, whereinsaid assigning means stores the determined location in the window slotassigned to the window being displayed.
 16. A computer system as definedin claim 15, further comprising:means for closing a window; said settingmeans causing a window slot assigned to a closing window to specify thelocation of the closing window on the display screen; and means forunassigning a window slot from a window being closed, thereby causingthe unassigned window slot to be available.
 17. A computer system asdefined in claim 15 wherein the means for assigning a window to a windowslot is said memory having stored therein a window identificationstructure.
 18. A computer system as defined in claim 14, wherein thelocation determining means interacts with said availability determiningmeans such that if an available window slot exists, then the determinedlocation is set to the location indicated in the available window slot,and if an available window slot does not exist, then the determinedlocation is based on the total number of in-use window slots.
 19. Amethod for positioning windows on a display screen in a computer systemin which a user perceives that multiple operations can be executedsimultaneously, the computer system having a processor and a displayscreen, the processor capable of executing an operating system whichsupports windowing functionality and a graphical user interface whichsupports windows, said method comprising the steps of:determining anoperation to be performed on a window; creating a window slot when awindow is opened and existing window slots are unavailable; and when theoperation includes opening the window, determining a location at whichto display the opened window on the display screen, the location beingbased on availability of a window slot and a total number of in-usewindow slots and displaying the window on the display screen at thedetermined location.
 20. A method as defined in claim 19 furthercomprising the step of:when the operation includes closing the window,storing the location on the display screen of the window being closedsuch that it can be accessed using a window slot.
 21. A computerreadable medium having stored thereon instructions for causing acomputer to perform the following steps:determining if an availablewindow slot exists; if an available window slot exists, assigning anavailable window slot to a window being opened and if an availablewindow slot does not exist, creating a new window slot; determining alocation at which to display the window being displayed, said locationbeing based upon availability of a window slot and a total number ofin-use window slots; and assigning the determined location to the windowbeing opened.
 22. A computer readable medium as defined in claim 21wherein if an available window slot exists, then the determined locationis set to the location indicated in the available window slot, and if anavailable window slot does not exist, then the determined location isbased on the total number of in-use window slots.
 23. A computerreadable medium having stored thereon instructions for causing acomputer to perform the following steps:determining an operation to beperformed on a window; when the operation includes opening thewindow,determining whether an available window slot exists; if anavailable window slot exists then displaying the window at the locationspecified by an available window slot; and if an available window slotdoes not exist, then creating a window slot and determining a locationat which to display the opened window on the display screen, thelocation being based on availability of a window slot and a total numberof in-use window slots and displaying the window on the display screenat the determined location.
 24. A computer readable medium as defined inclaim 23, wherein if an available window slot exists, the window beingopened is assigned to the window slot and if an available window slotdoes not exist, the window being opened is assigned to the createdwindow slot.
 25. A computer readable medium as defined in claim 24wherein the determined location is stored in the created window slot.26. A method for positioning windows on a display screen in a computersystem, said method comprising the steps of:determining an operation tobe performed on a window; when the operation includes opening thewindow,determining whether an available window slot exists; if anavailable window slot exists then displaying the window at the locationspecified by an available window slot; and if an available window slotdoes not exist, then creating a window slot and determining a locationat which to display the opened window on the display screen, thelocation being based on availability of a window slot and a total numberof in-use window slots and displaying the window on the display screenat the determined location.
 27. A method as defined in claim 26, whereinif an available window slot exists, the window being opened is assignedto the window slot and if an available window slot does not exist, thewindow being opened is assigned to the created window slot.
 28. A methodas defined in claim 27 wherein the determined location is stored in thecreated window slot.